﻿//Created by Action Script Viewer - http://www.buraks.com/asv
package GameMode {
    import flash.events.*;
    import Engine.Managers.*;
    import Classes.*;

    public class GMLinkedObjectEdit extends GMEdit {

        protected var m_parentObject:MapResource;
        protected var m_linkedObjects:Array;
        protected var m_gmObjectEditModes:Array;
        protected var m_parentOnlyMode:Boolean;

        public function GMLinkedObjectEdit(_arg1:MapResource, _arg2:Boolean=false){
            this.m_gmObjectEditModes = new Array();
            super();
            this.m_parentObject = _arg1;
            this.m_parentOnlyMode = _arg2;
            this.m_linkedObjects = Global.world.getLinkedObjects(this.m_parentObject);
            this.initializeGameModes();
        }
        protected function initializeGameModes():void{
        }
        override public function disableMode():void{
            var _local1:GameMode;
            for each (_local1 in this.m_gmObjectEditModes) {
                _local1.disableMode();
            };
            super.disableMode();
        }
        override public function enableMode():void{
            var _local1:GameMode;
            for each (_local1 in this.m_gmObjectEditModes) {
                _local1.enableMode();
                InputManager.removeHandler(_local1);
            };
            super.enableMode();
        }
        override public function onMouseMove(_arg1:MouseEvent):Boolean{
            var _local2:GameMode;
            for each (_local2 in this.m_gmObjectEditModes) {
                _local2.onMouseMove(_arg1);
            };
            super.onMouseMove(_arg1);
            return (true);
        }
        override public function onMouseDown(_arg1:MouseEvent):Boolean{
            var _local2:GameMode;
            for each (_local2 in this.m_gmObjectEditModes) {
                _local2.onMouseDown(_arg1);
            };
            super.onMouseDown(_arg1);
            return (true);
        }
        override public function onMouseUp(_arg1:MouseEvent):Boolean{
            super.onMouseUp(_arg1);
            return (false);
        }

    }
}//package GameMode 
